<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        /* 选中div的移入状态 */
        .box:hover {
            color: pink;
        }

        /* 选中div的点击状态 */
        .box:active {
            color: green;
        }
    </style>
</head>

<body>
    <div class="box">div标签</div>
</body>

</html>